package com.niit.musicserve.service.impl;

import com.niit.musicserve.dao.SingerMapper;
import com.niit.musicserve.entity.Singer;
import com.niit.musicserve.service.SingerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SingerServiceImpl implements SingerService {
	
	@Autowired
	public SingerMapper singerMapper;
	
	@Override
	public int insertSinger(Singer singer) {
		return singerMapper.insertSinger(singer);
	}
	
	@Override
	public int deleteSingerById(int singerId) {
		return singerMapper.deleteSingerById(singerId);
	}
	
	@Override
	public int updateSingerById(Singer singer) {
		return singerMapper.updateSingerById(singer);
	}
	
	@Override
	public List<Singer> allSinger() {
		return singerMapper.allSinger();
	}
	
	@Override
	public Singer singerByPrimaryKey(Integer singerId) {
		return singerMapper.singerByPrimaryKey(singerId);
	}
	
	@Override
	public List<Singer> singerByName(String signerName) {
		return singerMapper.singerByName(signerName);
	}
	
	@Override
	public List<Singer> singerBySex(Integer sex) {
		return singerMapper.singerBySex(sex);
	}
	
	@Override
	public Integer numberOfSinger() {return singerMapper.numberOfSinger();}
	
	@Override
	public int numberOfSingerBySex(int sex) {return singerMapper.numberOfSingerBySex(sex);}
	
	@Override
	public List<Singer> singerByFirstLetter(String firstLetter) {return singerMapper.singerByFirstLetter(firstLetter);
	}
}
